#ifndef _IO_OUT_H_
#define _IO_OUT_H_

#include "r_cg_macrodriver.h"

#define OUTPUT_SIZE     25

#define OUT1        P0.4
#define OUT2        P10.2
#define OUT3        P13.0
#define OUT4        P2.0
#define OUT5        P2.1
#define OUT6        P2.2
#define OUT7        P15.5
#define OUT8        P15.6
#define OUT9        P10.0
#define OUT10       P14.7
#define OUT11       P14.6
#define OUT12       P11.1
#define OUT13       P11.0
#define OUT14       P10.1
#define OUT15       P1.0
#define OUT16       P1.5
#define OUT17       P1.6
#define OUT18       P1.7
#define OUT19       P5.7
#define OUT20       P5.6
#define OUT21       P5.5
#define OUT22       P5.4
#define OUT23       P5.3
#define OUT24       P5.2
#define OUT25       P5.1

typedef enum
{
    OUT_1,
    OUT_2,
    OUT_3,
    OUT_4,
    OUT_5,
    OUT_6,
    OUT_7,
    OUT_8,
    OUT_9,
    OUT_10,
    OUT_11,
    OUT_12,
    OUT_13,
    OUT_14,
    OUT_15,
    OUT_16,
    OUT_17,
    OUT_18,
    OUT_19,
    OUT_20,
    OUT_21,
    OUT_22,
    OUT_23,
    OUT_24,
    OUT_25
}out_index_t;

void OutPutEventLoop(void);
void SetGPIO(out_index_t gpiox);
void ResetGPIO(out_index_t gpiox);
/*
#define OUT1	(1 << 0)
#define OUT2	(1 << 1)
#define OUT3	(1 << 2)
#define OUT4	(1 << 3)
#define OUT5	(1 << 4)
#define OUT6	(1 << 5)
#define OUT7	(1 << 6)
#define OUT8	(1 << 7)
#define OUT9	(1 << 8)
#define OUT10	(1 << 9)
#define OUT11	(1 << 10)
#define OUT12	(1 << 11)
#define OUT13   OUT1
#define OUT14   OUT2
#define OUT15   OUT3
#define OUT16   OUT4
#define OUT17   OUT5
#define OUT18   OUT6
#define OUT19   OUT7
#define OUT20   OUT8
#define OUT21   OUT9
#define OUT22   OUT10
#define OUT23   OUT11
#define OUT24   OUT12
#define OUT25   (1 << 12)

void SetGPIO(uint8_t type, uint8_t val);
void ResetGPIO(uint8_t type, uint8_t val);
*/
#endif